#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Time   :  2019/7/4 10:50
@Author :  geqh
@file   :  lang_recognition.py
"""
import langid


def language(text):
    lang = langid.classify(text)
    lang = list(lang)
    if lang[0] == 'zh':
        lang[0] = 'ch'

    return lang[0]
